package com.pactera.madp.cp.api.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.util.Date;


/**
 * @description:企业实体类
 * @author: Huayu
 * @time: 2020/11/23 19:10
 */
@TableName("cp_corp")
@ApiModel(value = "企业实体")
@Data
public class CorpEntity extends BaseEntity<CorpEntity> {

    @TableId(value = "id", type = IdType.AUTO)
    @TableField("id")
    @ApiModelProperty(value = "企业id")
    private Integer corpId;

    @TableField("name")
    @ApiModelProperty(value = "企业名称")
    @NotNull(message = "企业名称不能为空")
    private String corpName;//企业名称

    @TableField("wx_corpid")
    @NotNull(message = "企业微信ID不能为空")
    @ApiModelProperty(value = "企业微信id")
    private String wxCorpId;//企业微信ID

    @ApiModelProperty(value = "企业代码(企业统一社会信用代码)")
    private String socialCode;//企业代码(企业统一社会信用代码)

    @ApiModelProperty(value = "企业通讯录secret")
    @NotNull(message = "企业通讯录secret不能为空")
    private String employeeSecret;//企业通讯录secret

    @ApiModelProperty(value = "事件回调地址")
    private String eventCallback;//事件回调地址

    @ApiModelProperty(value = "企业外部联系人secret")
    @NotNull(message = "外部联系人secret不能为空")
    private String contactSecret;//企业外部联系人secret

    @ApiModelProperty(value = "回调token")
    private String token;//回调token

    @ApiModelProperty(value = "回调消息加密串")
    private String encodingAesKey;//回调消息加密串

    @ApiModelProperty(value = "是否默认企业")
    private Boolean defaultEnable;

}
